#!/usr/bin/env python
# -*- coding: utf-8 -*-

# @Time     :2020/08/04
# @Author   :Changshu
# @File     :practice_28.py
# 28. 实现 strStr()
import re
def strStr(haystack:str,needle:str)->int:
	r=re.search(needle,haystack)
	if r:
		t=r.span()
		return t[0]
	return -1


if __name__=='__main__':
	haystack='aaaaa'
	needle='bba'
	print(strStr(haystack,needle))